/*
 *  Configer.h
 *
 *	Date: 2011-5-10
 *  Author: linshenqi
 */

#ifndef CONFIGER_H_
#define CONFIGER_H_

#define MAX_LEN 32


class Configer
{
public:
	Configer() : m_bChanged(false),m_bUploaded(false){}
	~Configer(){}

public:
	long Read(const CString& AppName, const CString& KeyName, LPSTR pValue, const CString& path);
	void Write(const CString& AppName, const CString& KeyName, const CString& pValue, const CString& path);
	void CreateINI(const CString& path);
	bool OpenINI(const CString& path);
	void SetPath(const CString& path)
	{
		m_Path = path;
	}
	CString& GetPath()
	{
		return m_Path;
	}

	void Open(const CString& path);
	void Save(const CString& path);
	void Load(int i, bool bFlag = true);
	void Upload(int i);
	bool ALT();

public:
	bool m_bChanged;
	bool m_bUploaded;

private:
	CString m_Path;
};

#endif